import { Inject, Injector, Plugin} from '@univerjs/core';
import BindingPanel from './vueui';
import { ComponentManager,ISidebarService } from '@univerjs/ui'
//import { reactive } from 'vue';
const NAME = 'SHEET_BANDINGDATA_PLUGIN';
class bandingUIPlugin extends Plugin {
  static override pluginName = NAME
  constructor(    
    @Inject(Injector) override readonly _injector: Injector,
    @Inject(ComponentManager) private readonly componentManager: ComponentManager,
    @Inject(ISidebarService) private readonly sidebarService: ISidebarService,      
  ) {
    super()    
  }
onRendered() {
const bandingPanel = BindingPanel(this._injector);
this.componentManager.register('bandingUI', 
 bandingPanel,
  {
    framework: 'vue3',
  });
this.sidebarService.open({
  header: { title: '字段与单元格绑定面板' },
  children: { label: 'bandingUI' },
  width: 360,
})
  }
}
export default bandingUIPlugin
